package com.soft.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public  class GetDate {
    public static Date getDate(Integer day){
        Date date = new Date(  );
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DAY_OF_MONTH, day);
        return date;
    }
    public static String getCode(Date date){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
        return simpleDateFormat.format(date);
    }
//    public static void main(String[] args) throws ParseException {
//    }
}
